<template>
    <el-upload
        action=""
        :file-list="fileList"
        v-bind="$attrs"
        v-on="$listeners"
        :before-upload="beforeUpload"
        :http-request="handleRequest"
    >
        <el-button size="small" type="primary">点击上传</el-button>
    </el-upload>
</template>

<script>
export default {
    name: "uploadFile",
    data () {
        return {
            fileList:[]
        }
    },
    methods: {
        beforeUpload(file){
            this.fileList = [...this.fileList, file]
        },
        //阻止http请求，由表单统一发送
        handleRequest(){}
    }
}
</script>

<style scoped>

</style>